function tau=get_ud(gamma_b,gamma_w,sigma_b,sigma_w,mu)

tau=(normcdf(-gamma_b/sigma_b)-normcdf(-gamma_w/sigma_w))*(1-mu) ...
    -(normcdf((gamma_b-1)/sigma_b)-normcdf((gamma_w-1)/sigma_w))*mu;

